package com.jiazhong.mingxing.boot.boot01.component;

import org.springframework.beans.factory.annotation.Value;
import org.springframework.stereotype.Component;
import org.springframework.stereotype.Controller;
import org.springframework.stereotype.Repository;
import org.springframework.stereotype.Service;

@Component
public class DemoA {
    // 给属性赋值
    @Value("101")
    private Integer id;
    @Value("张三")
    private String name;
    @Value("男")
    private Character gender;

    @Override
    public String toString() {
        return "DemoA{" +
                "id=" + id +
                ", name='" + name + '\'' +
                ", gender=" + gender +
                '}';
    }
}
